Skip to content

fix: resolve CI build failures in plugin-msw DTS and docs MDX generation#857

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-one-more-time
Mar 2, 2026
Merged

fix: resolve CI build failures in plugin-msw DTS and docs MDX generation#857
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Two independent build failures on main:

plugin-msw DTS build error (TS2345)

getData spreads string | string[] options directly into protocol's getData() which expects string[]. Normalize before passing:

const normalize = (v?: string | string[]) => v == null ? undefined : Array.isArray(v) ? v : [v];
const body = await this.getProtocol().getData({
    object: objectName,
    id,
    select: normalize(options?.select),
    expand: normalize(options?.expand),
});

Docs prerender crash on /en/docs/references/system/translation

build-docs.ts emits schema descriptions into MDX without escaping curly braces. MessageFormatSchema.describe('...simple {variable} replacement') causes MDX to evaluate variable as a JSX expression → ReferenceError. Applied the same {...}`{...}` escaping already used for property descriptions (line 173) to schema-level descriptions (line 163).

Original prompt

fix all ci errors


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-play Ready Ready Preview, Comment Mar 2, 2026 5:52am
spec Canceled Canceled Mar 2, 2026 5:52am

Request Review

…scaping

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix all CI errors fix: resolve CI build failures in plugin-msw DTS and docs MDX generation Mar 2, 2026
@hotlong hotlong marked this pull request as ready for review March 2, 2026 05:57
Copilot AI review requested due to automatic review settings March 2, 2026 05:57
@hotlong hotlong merged commit 1e338f2 into main Mar 2, 2026
3 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two independent CI build failures on main: a TypeScript type error (TS2345) in plugin-msw where string | string[] options were spread directly into a method expecting string[], and an MDX prerender crash caused by unescaped curly braces in schema descriptions being interpreted as JSX expressions. The auto-generated documentation files are also regenerated to reflect current schema state.

Changes:

  • Normalize string | string[] options to string[] before passing to getProtocol().getData() in plugin-msw
  • Escape {...} patterns in schema-level descriptions in the build-docs.ts MDX generator
  • Regenerate multiple auto-generated MDX documentation files to reflect current schema exports

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/plugins/plugin-msw/src/msw-plugin.ts Fixes TS2345 by normalizing string | string[] to string[] before passing to getData()
packages/spec/scripts/build-docs.ts Escapes curly braces in schema descriptions to prevent MDX JSX evaluation errors
content/docs/references/ui/action.mdx Regenerated; removes Action schema section, updates imports to current exports
content/docs/references/system/translation.mdx Regenerated; adds new schema sections for translation-related types
content/docs/references/system/migration.mdx Regenerated; removes ChangeSet, CreateObjectOperation, and MigrationOperation sections
content/docs/references/system/metadata-persistence.mdx Regenerated; adds PackagePublishResult and new MetadataRecord fields
content/docs/references/integration/translation.mdx New auto-generated file for MessageFormat in the integration module
content/docs/references/integration/misc.mdx Regenerated; removes MessageFormat (now in its own file)
content/docs/references/integration/meta.json Adds translation entry to the integration reference nav
content/docs/references/data/query.mdx Regenerated; expands expand field description
content/docs/references/data/object.mdx Regenerated; removes Object schema section, updates imports
content/docs/references/data/field.mdx Regenerated; expands reference field description
content/docs/references/api/protocol.mdx Regenerated; expands expand field descriptions
content/docs/references/api/odata.mdx Regenerated; expands $expand field description
content/docs/references/api/metadata.mdx Regenerated; removes ObjectDefinitionResponse section, updates imports
content/docs/references/api/contract.mdx Regenerated; expands expand field description
content/docs/references/ai/feedback-loop.mdx Regenerated; removes FeedbackLoop and Resolution sections, updates imports

Comment on lines 83 to 85
---


Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two consecutive --- horizontal rules with only a blank line between them at lines 82–88. The first --- (line 85) appears to be an orphaned divider left over after the FieldTranslation section. This produces a double divider in the rendered docs.

Suggested change
---

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants